// menu.ts

// src/types/TOnlineListingResponse.ts

export interface TOnlineListingItem {
  ogId: number;
  ogOnlineTime: string; // 可以转换为 Date 类型
  ogUserName: string;
  ogUrId: number;
  ogEquipment: string;
  ogIp: string;
}

/** 权限菜单响应结构 */
export interface AccessMenuResult {
  success: boolean;
  code: number;
  message: string;
  data: {
    data: TOnlineListingItem[]; // 注意：这里嵌套了两层 data
  };
}


// auth-api.ts 或单独建 menu-api.ts

import { baseRequestClient, requestClient } from '#/api/request';

/**
 * 获取用户权限菜单
 */
export async function getAccessMenusApi() {
  return requestClient.get<AccessMenuResult>('/tonlinelisting/list');
}

